#pragma once

namespace mgfx
{
	class Texture
	{
	public:
		static Texture * createFromFile(const std::string & fileName);
		static Texture * createEmpty(const std::string & name, int width, int height);
		static void freeAll();

		ID3D11ShaderResourceView * mResourceView;
		ID3D11Texture2D * mTexture;
		void setData(const byte * data);

	private:
		Texture();
		~Texture();

		typedef std::map<std::string, Texture*> ResourceMap;
		static ResourceMap mResources;
	};
}